package com.anxin.registerManagement.bean.persist;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.sql.Date;

/**
 * @author 叶前呈
 * @date 2022/1/25 10:23
 */
@Data
@ApiModel("用户类")
public class User extends CommonData {

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("用户id")
    private Integer id;

    @ApiModelProperty("用户名")
    @NotBlank(message = "用户名不能为空")
    private String userName;

    @ApiModelProperty("密码")
    private String passWord;

    @ApiModelProperty("姓名")
    @NotBlank(message = "姓名不能为空")
    private String nickName;

    @ApiModelProperty("身份证")
    @NotBlank(message = "身份证不能为空")
    private String idCard;

    @ApiModelProperty("照片id")
    private Integer photoId;

    @ApiModelProperty("性别")
    @NotBlank(message = "性别不能为空")
    private String sex;

    @ApiModelProperty("出生日期")
    private Date dateOfBirth;

    @ApiModelProperty("手机号")
    private String telephone;

    @ApiModelProperty("班级id")
    @NotNull(message = "班级不能为空")
    private Integer classRoomId;

    @ApiModelProperty("房间id")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Integer roomId;

    @ApiModelProperty("学制")
    @NotNull(message = "学制不能为空")
    private Integer academicYear;

    @ApiModelProperty("学历id")
    @NotNull(message = "学历不能为空")
    private Integer culturalLevelId;

    @ApiModelProperty("入学时间")
    @NotNull(message = "入学时间不能为空")
    private Integer admissionYear;

    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty("民族id")
    private Integer nationalityId;

    @ApiModelProperty("政治面貌id")
    private Integer politicalStatusId;

    @ApiModelProperty("生源地")
    private String area;

    @ApiModelProperty("家庭地址")
    private String homeAddress;

    @ApiModelProperty("是否付费")
    private Boolean isPay;

    @ApiModelProperty("是否禁用")
    private Boolean isDisabled;

    @ApiModelProperty("是否开启禁用模式")
    private Boolean isDisabledMode;

}
